package com.lingjtx.common.core.constant;

public enum SignatureType {
    // 1-校验成功；2-时间戳不在有效窗口内；3-随机数已存在；4-验签错误
    SUCCESS(1, "校验成功"),
    TIMESTAMP(2, "验签时间戳不在有效窗口内"),
    NONCE(3, "验签nonce已存在"),
    FAIL(4, "验签错误")
    ;

    private final int code;

    private final String msg;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    SignatureType(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String toString() {
        return getMsg();
    }
}
